<?php /*a:3:{s:64:"D:\phpStudy\WWW\tgphp\application\backman\view\staff\option.html";i:1606843237;s:58:"D:\phpStudy\WWW\tgphp\application\backman\view\layout.html";i:1577170781;s:55:"D:\phpStudy\WWW\tgphp\application\backman\view\nav.html";i:1563374948;}*/ ?>
<!DOCTYPE html>
<html class="admin-sm">
<head>
<meta charset="utf-8">
<title>平台管理中心</title>
<link rel="icon" sizes="32*32" href="/favicon.ico">
<link rel="stylesheet" type="text/css" href="/static/css/font.css">
<link rel="stylesheet" type="text/css" href="/static/css/admin.css">
<link rel="stylesheet" type="text/css" href="/static/iview/iview.css">
<link rel="stylesheet" type="text/css" href="/static/css/iconf/iconfont.css">
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/vue"></script>
<script type="text/javascript" src="/static/iview/iview.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/vue-resource@1.5.1"></script>
	<script src="/static/lib/assets/jquery-1.12.4.js"></script>
<script type="text/javascript" src="/static/js/do.js"></script>
<script src="/static/lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/static/js/admin.js"></script>
<script type="text/javascript" src="/static/js/package.js" data-path="/static/js/" data-root="/<?php echo request()->controller(); ?>/"  data-src="/static/js/common"></script>
</head>
<body>
<div id="app"></div>
<div class="x-nav">
    <span class="layui-breadcrumb">
        <a href="<?php echo url('index/home'); ?>" onclick="xadmin.add_tab('<?php echo url('index/home'); ?>','总揽')">首页</a>
        <?php foreach($path as $vv): ?>
        <a><?php echo htmlentities($vv['name']); ?></a>
        <?php endforeach; ?>
    </span>
    <a class="layui-btn layui-btn-small layui-btn-normal" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新"> <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
    </a>
</div>
<div class="layui-fluid">
	<div class="layui-row layui-col-space15">
		<div class="layui-col-md12">
			<div class="layui-card">
				
<style>
    .layui-tree-icon {
        height: 14px;
        line-height: 12px;
        width: 17px;
        text-align: center;
        border: 1px solid #c0c4cc;
    }
</style>

<div class="layui-tab layui-tab-brief">
	<ul class="layui-tab-title">
	    <li><a href="<?php echo url('index'); ?>"><?php echo htmlentities($pathCurrent['name']); ?></a></li>
	    <li class="layui-this"><?php if(empty($info) || (($info instanceof \think\Collection || $info instanceof \think\Paginator ) && $info->isEmpty())): ?>新增<?php else: ?>编辑<?php endif; ?>域名</li>
  	</ul>
</div>
<div class="layui-card-body">
	<form class="layui-form" data-model="form-submit">
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
		  	<legend>基本设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<label class="layui-form-label">推广域名</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" name="tg_url" value="<?php echo htmlentities($info['tg_url']); ?>">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">跳转域名</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" name="tz_url" value="<?php echo htmlentities($info['tz_url']); ?>">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">跳转域名限制</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" name="jump_url" placeholder="可设置多个域名用英文,隔开" value="<?php echo htmlentities($info['jump_url']); ?>">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">禁止跳转地区</label>
			<div class="layui-input-block">
				<div id="addr_tap" class="demo-transfer"></div>

			</div>
			<input type="hidden" name="kill_addr" id="kill_addr" value='<?php echo htmlspecialchars_decode($info['kill_addr']); ?>'>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">限制访问次数</label>
			<div class="layui-input-block">
				<input type="text" class="layui-input" name="day_limit" placeholder="限制用户访问次数，达到次数不跳转页面" value="<?php echo htmlentities($info['day_limit']); ?>">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">启用手机拦截</label>
			<div class="layui-input-block">
				<?php $is_mobile = isset($info['is_mobile']) ? $info['is_mobile'] : '0'; ?>
				<input type="radio" name="is_mobile" value="1" title="启用" <?php if($is_mobile == 1): ?> checked="" <?php endif; ?>>
				<input type="radio" name="is_mobile" value="0" title="禁用" <?php if($is_mobile == 0): ?> checked="" <?php endif; ?>>
			</div>
		</div>
		<div class="layui-form-item">
	    	<div class="layui-input-block">
	    		<input type="hidden" name="id" value="<?php echo htmlentities($info['id']); ?>">
	      		<button class="layui-btn layui-btn-normal">保存</button>
<!--	      		<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
	    	</div>
	  	</div>
	</form>
</div>

			</div>
		</div>
	</div>
</div>


<script type="text/javascript">
var webRoot = "<?php echo request()->root(true); ?>/";
var webControl = "<?php echo request()->controller(); ?>";
Do.ready('common',function(){ base.frame(); });
</script>

<script type="text/javascript" src="/static/lib/assets/data.js"></script>
<script type="text/javascript">
    var mixin = {};
    var cs = 0;
    var value_str = ('<?php echo htmlspecialchars_decode($info['kill_addr']); ?>');
    if( value_str ){
		var value_data = JSON.parse('<?php echo htmlspecialchars_decode($info['kill_addr']); ?>');
	} else {
		var value_data = Array();
	}

    // data1 = [{"value": "1", "title": "李白"}];
	var data1 = JSON.parse('<?php echo htmlspecialchars_decode($pro); ?>');
    layui.use(['form','transfer','util'],function(){
        var transfer = layui.transfer
		var form = layui.form
		var util = layui.util


		//基础效果
		transfer.render({
			elem: '#addr_tap'
			,data: data1
			,value:value_data
			,showSearch: true
			,id: 'addr'
			,onchange: function(obj, index){
				// layer.alert('来自 <strong>'+ index + '</strong> 的数据：'+ JSON.stringify(obj)); //获得被穿梭时的数据
				at1();
			}
		})

		//批量办法定事件

		util.event('lay-demoTransferActive', {
			getData: function(othis){
				var val = Array();
				var getData = transfer.getData('addr'); //获取右侧数据
				for( var i = 0; i < getData.length; i++ ){
					val.push(getData.i.value)
					console.log(getData.i.value);
				}
				// layer.alert(JSON.stringify(val));
			}

		});
		function at1(){
			var val = Array();
			var getData = transfer.getData('addr'); //获取右侧数据

			for( var i = 0; i < getData.length; i++ ){
				val.push(getData[i]['value'])
			}
			$('#kill_addr').val(JSON.stringify(val));
		}
    });

   

    
    

</script>

</body>
</html>